package site.wanjiahao.map;


public interface Map<K, V> {

    int size();

    boolean isEmpty();

    void clear();

    V put(K key, V value);

    V get(K ket);

    V remove(K key);

    boolean containsKey(K key);

    boolean containsValue(V value);

    void traversal(Consumer<K, V> consumer);


    // 接口中的任何事务都是public static
    abstract class Consumer<K, V> {
        public boolean isStop;

        public abstract boolean accept(K key, V value);
    }

}
